package com.zc.timedown.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zc.timedown.dto.TodayPlanItemDto;
import com.zc.timedown.domain.AllStats;
import com.zc.timedown.domain.TodayGoal;
import com.zc.timedown.domain.TodayPlan;
import com.zc.timedown.vo.*;
import java.util.List;

/**
 * 今日计划Service接口
 *
 * @author zc
 * @date 2025-09-30
 */
public interface ApiTodayPlanService extends IService<TodayPlan>
{
    /**
     * 查询今日计划
     *
     * @param id 今日计划主键
     * @return 今日计划
     */
    public TodayPlan selectTodayPlanById(Long id);

    /**
     * 查询今日计划列表
     *
     * @param todayPlan 今日计划
     * @return 今日计划集合
     */
    public List<TodayPlan> selectTodayPlanList(TodayPlan todayPlan);

    /**
     * 新增今日计划
     *
     * @param todayPlan 今日计划
     * @return 结果
     */
    public int insertTodayPlan(TodayPlan todayPlan);

    /**
     * 修改今日计划
     *
     * @param todayPlan 今日计划
     * @return 结果
     */
    public int updateTodayPlan(TodayPlan todayPlan);

    /**
     * 批量删除今日计划
     *
     * @param ids 需要删除的今日计划主键集合
     * @return 结果
     */
    public int deleteTodayPlanByIds(Long[] ids);

    /**
     * 删除今日计划信息
     *
     * @param id 今日计划主键
     * @return 结果
     */
    public int deleteTodayPlanById(Long id);

    /**
     * 获取每日计划
     *
     * @param userId 今日计划主键
     * @return 结果
     */
    public TodayPlanVo getDailyPlan(Long userId);

    /**
     * 每日目标子项打卡
     *
     * @param todayPlanItemDto 今日计划主键
     * @return 结果
     */
    int updateTodayPlanItem(TodayPlanItemDto todayPlanItemDto);


    /**
     * 添加今日目标和今日计划子项
     *
     * @param todayGoal 今日计划主键
     * @return 结果
     */
    int insertTodayGoalAndPlanItem(TodayGoal todayGoal);

    /**
     * 删除今日目标和今日计划子项
     *
     * @param todayPlanItemDto 今日计划主键
     * @return 结果
     */
    int delTodayGoalAndPlanItem(TodayPlanItemDto todayPlanItemDto);

    List<WeeklyPlanStatisticsVo> getWeeklyPlanStatistics(Long userId);

    List<DailyCompletedStatisticsVo> getMonthlyCompletedStatistics(Long userId);

    List<WeeklyStatsVO> getRecent4WeeksStats();

    List<MonthlyStatsVo> getMonthlyClockInStats(Long userId, Integer year, Integer month);

    AllStats selectAllClockInStats(Long userId);


    TimeRangeStatisticsVo getTimeRangeStats(Long userId, String startDate, String endDate);

    List<DailyPlanStatisticsVo> getDailyPlanStatistics(Long userId, String startDate, String endDate);
}